import { ref } from 'vue'
import { ItemType } from "@/components/types/types"


const academic:any = ref<ItemType[]>([
  {
    label: '会议模式',
    model: 'pattern',
    placeholder: '请选择',
    type: 'radio',
    required: true,
    disabled: false,
    message: '请选择会议模式',
  },
])

const researchItem:any = ref<ItemType[]>([
  {
    label: '调研问卷',
    model: 'examinationId',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    url: 'study/paper/list',
    parm: {kind: 1},
    message: '请选择学习资料',
    selectData: []
  },
  {
    label: '品种所属',
    model: 'drugOwner',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    message: '请选择品种所属',
    dict: 'variety_mana_owner',
    selectData: []
  },
  {
    label: '调研对象',
    model: 'researchObject',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    message: '请选择调研对象',
    dict: 'rese_arch_Object',
    selectData: []
  },
])



const compList:any = ref<ItemType[]>([
  {
    label: '竞品品种',
    model: 'competeDrugId',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    url: 'base/drug/list',
    parm: {owner: 2},
    message: '请选择竞品品种',
    selectData: []
  },
  {
    label: '生产厂家',
    model: 'competeFactory',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    message: '请选择生产厂家',
    dict: 'set_manufac_turer',
    selectData: [],
    valueIsName: 'dictLabel',
  },
])




const bill = ref<ItemType[]>([
  
  {
    label: '名称',
    message: '请输入名称',
    required: true,
    model: 'name',
    placeholder: '请输入',
    type: 'input'
  },
  { 
    label: '年份',
    model: 'year',
    placeholder: '请选择',
    type: 'select',
    dict: 'set_year_time',
    selectData: []
  },
  { 
    label: '月份',
    model: 'month',
    placeholder: '请选择',
    type: 'select',
    dict: 'set_moon_time',
    selectData: []
  },
  {
    label: '类型',
    model: 'type',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    message: '请选择品类',
    dict: 'timed_task_type',
    selectData: []
  },
  {
    label: '任务名称',
    message: '请输入名称',
    required: true,
    model: 'taskName',
    placeholder: '请输入',
    type: 'input'
  },
  {
    label: '省份',
    model: 'province',
    placeholder: '请选择',
    type: 'select',
    url: 'base/city/get-province',
    valueName: 'cityname',
    required: true,
    disabled: false,
    message: '请选择类别',
    selectData: []
  },
  {
    label: '数量',
    message: '请输入数量',
    required: true,
    model: 'quantity',
    placeholder: '请输入',
    type: 'input',
    regexp: 'number',
    maxlength: 8
  },
  {
    label: '已申请数量',
    message: '请输入已申请数量',
    required: false,
    disabled: true,
    model: 'appliedQty',
    placeholder: '请输入',
    type: 'input'
  },
  {
    label: '开始时间：',
    model: 'startTime',
    required: true,
    placeholder: '选择时间',
    type: 'beginTime',
    timeType: 'datetime',
    message: '请选择开始时间',
    setTime: 'setTime',
  },
  {
    label: '截止时间：',
    model: 'endTime',
    required: true,
    placeholder: '选择时间',
    type: 'beginTime',
    timeType: 'datetime',
    message: '请选择截止时间',
    setTime: 'setTimemin',
  },
  {
    label: '状态',
    model: 'status',
    placeholder: '请选择',
    type: 'select',
    required: false,
    disabled: true,
    dict: 'timed_task_status',
    message: '请选择状态',
    selectData: []
  },
  {
    label: '积分/个',
    message: '请输入积分',
    required: true,
    model: 'scorePer',
    placeholder: '请输入',
    type: 'input'
  },
  {
    label: '品种',
    model: 'drugId',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    url: '/base/drug/list',
    message: '请选择品种',
    selectData: []
  },
  {
    label: '项目类型',
    model: 'projectType',
    placeholder: '请选择',
    type: 'select',
    required: true,
    disabled: false,
    message: '请选择项目类型',
    dict: 'pro_ject_type',
    selectData: []
  }
])





interface Parmes {
  status?: string;
  [propName: string]: any,
}
const datas = ref<Parmes>({
  appliedQty: 0,
  status: '1',
})
export default { bill, datas, researchItem, compList, academic }